package org.xxgc.qiuqiu.controller;

import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;

/**
 * 用于接受和广播游戏数据Created by Administrator on 2017/4/17.
 */

@Controller
public class WebScoketConlltroller {
    /**
     * 接收以  /qiuqiu/position  位置信息
     * 发送的qiuqiu可省略
     * 接收的不行
     */
    @MessageMapping("/game/position")
    @SendTo("/game/position")
    public String position(String message) {
        //外挂判断
        //条件判断
        //.......
        return message;
    }


    @MessageMapping("/game/skill")
    @SendTo("/game/skill")
    public String skill(String message) {
        //外挂判断
        //条件判断
        //.......
        return message;
    }
}
